Fix rotation regression from #3970.
Merge pull request #3971 from brendandahl/rotation2

Fix rotation regression from #3970.