Export types from compile-lib, re-expand stuff in tests.

Looks like I'm getting rid of abstraction, but realized that what I
really want to test in the second test block can't be tested with the
old locators.
Actually check that compile-module respects needs-compile.

Caught a few issues in the implementation due to this.