When rotation is enabled and doing a scale line-search (locked islands or "fraction" margin method), if the `rotate_inside_square` would result in a a tighter packing, the wrong scale value was being used, resulting in UVs outside of the unit square. Reported as #108037 "1. Use locked scale on after scaling UV..."