Safer handling of mx lines in test harness