Only save module reference information when compiling a source file