Fix a bug where memory dump didn't work in cosimulation mode (which broke tests)