The problem appears to be that successive calls of the module_builder.module_builder_t.register_module_dependency method aren't additive; only W1040 warnings for the declarations listed in the last exposed_decl.pypp.txt file are suppressed.