Fix the incorrect eliding of import declaration

Fixes #1130