ce: bug(component_loader) returns null imports

In some cases, removing the link causes the import to become null. Grab
a reference to the import before removing the link.