Fixed issue with rotated labels along a vertical axis becoming wrongly positioned based on bounding box. Closes #1951.