Fix to incorrect shape comparison that seems to have sneaked back in