Recalculate Tile z after replacing tiles (Fixes #142)