[PixelOverlay] Fix bug in vertical orientation code