Report error at codegen when child module is missing @Module annotation

It previously failed with an NPE.
Also adds a test for the reflective backend.