This will cause a crash when dealing with anything else than a tile layer.