Set pending mode changes immediately when an object is removed from the mode stacker. And fix mlock creator from cs set persist on.