Fix bbox regression in shape.invert()