WIP: Add linked modules to global list

See #2.

This fix is not complete as it lacks code for freeing these automatically added items.