Fixed tile flipping order for rotated tiles

Since the scaling happens after the rotation, the scaleX and scaleY
factors need to be swapped when flipping anti-diagonally.

This fixes a regression that appeared in commit f40431939986dcf71c.

Thanks to @mauvecow for finding this issue, and the initial patch.