Fix broken static import with alias.

Added tests to ensure they don't break again.
11 files changed