Applied DHowett's %subclass fix from commit 1581a5997c