Fixed the major class renaming bug, which prevented renamed classes from
being initialised.