Fix building plugins in release builds

We need to load the transitive closure of the plugin in order to compile
the package with the plugin. But we weren't following the transitive
closure when loading prebuilt packages. This fixes that.