Fix bounds testing operating on inverted y axis