TileMap: Fix infinite loop when trying to bucket-delete empty tiles.
Right-clicking when the bucket tool is enabled means "erase all instances of this tile".
So it doesn't make sense to try doing this for empty tiles :P
Fixes #10065
(cherry picked from commit 95da12212beb6ab947de5ebbb0d12ffba3d2006c)