restore import declarations to global scope ids