small fixes to enable the reuse of the pass manager across multiple modules