[runtime] Make a marshalling test more robust.