Fix VM test code loading conditions