Fix class redefinition semantics (take 2).