[DF-2503] Fix creating tilemask copy for correct undo\redo