Reference libraries in hardware addons when they reference another core.

Fixes #1445