Try to make new layering stuff play nicely with undo.