Using the enclosed type to fix completion and imports for inner classes.
Closes #1002002