For ENG-3982, fix yet more bugs in the test, and add validation that ensures the test actually tests what we think it is testing.