Almost final fix for failure on test_virtualmem.cpp