Fixed an obscure issue with inheritance at least 3 levels deep.