#9345: fix axis invert calculation