Fix class redefinition semantics.