Fix missing ticks on inverted log axis

As reported in the mailing list thread: "missing ticks on inverted log axes"

This should fix a bug introduced by 255f213cd9fc6f458e13bb28fc43e8cb636b2158 that made some ticks disappear on inverted axes.