Just open a new file from one of the standard templates and then run the following from the script editor:
import rhinoscriptsyntax as rs
rs.LayerVisible("Layer 01",False)
rs.LayerVisible("Layer 03",False)
That should turn off Layer 01 and Layer 03. Now hit the Undo button or Ctrl+Z. It says “Undoing EditPythonscript”, but the layers don’t turn back on.
In V5, the same script responds correctly to Undo, the layers become visible again.
I didn’t see a youtrack item for this, but maybe I missed it.
–Mitch