Entities are pushed away from invalid tiles

#Closes 1058