Fix ShapeShearStrategy not to get crazy with zero-width shapes
Just avoid division by zero and insanely big shear values
(cherry picked from commit e4530c63a3fdf114fe3088f9f80fbd41bccf9f74)