fixes "flatnested"  feature for out-of-scope defined nested classes