Fixed #21263 -- Fixed issue with override_settings in inherited classes

When both parent and child classes are decorated with override_settings,
child class settings should take precedence.
Thanks Sephi for the report.