Bugfixes for layer previews when undo / redoing