Added more compilation dependency registrations. This can potentially make
the compiler bark on more cyclic reference cases, but it's necessary to
ensure indexed programs aren't (completely or partially) empty in pass 2,
which can lead to very strange compilation errors.
Also cleaned up some compiler error messages a little.