If it returns a '-1' and this 'do a thing' includes actions that are supposed to work on that object that a '-1' returns, then non is picked. But i can not now that, you did't give that info.
To avoid this, you better make use of a function. Functions pick from scratch, they forget the previous picked objects. So the logic would be something like :
(variable) 'Checked' = 0
(variable) 'YtoCHeck' = the height of the tilemap cell / 2
while
'checked' = 0
-------------------Call function"CheckEmpty" param(0) = 'YtoCHeck'
if returned param. > 0
------------------ add cell heigh to 'Ytocheck'
else
------------------ checked = 1
------------------ Do youre stuff with x = player.x and y= 'YtoCHeck'
On function "CheckEmpty"
Player is overlapping tilemap at Y = param. (0)
---------------------set return parameter to tilemap.pickedcount
This should stop because you have a floor. Or you can cap it to 6 as you desire.