better handling of rotated entities

This improves the rendering of selection handles for entities that have been rotated.