This is a very old bug and a few attempts have been made to fix it before, Old code was checking worldspace axis flipping, instead of axis flipping WRT the axis-alignment of the object.
This is a very old bug and a few attempts have been made to fix it before, Old code was checking worldspace axis flipping, instead of axis flipping WRT the axis-alignment of the object.