core: fix imports for inner classes with same names