Bugfix for fixup_imports: Enable checking for terminating import