Fix incorrect allocation of storage for visuals
Fix crash on tile duplication without tile selection
Let the current tile take precedence over the selected tile
Remove unneeded field from ImageData