Fixed a bug where a sub-optimal transform would be found for rotated rooms