Correctly handle 'import as' import