The test can fail under some condition because it waits for a proof to
become orphaned by waiting for the proof to be known by the node then
asserting its orphan state. But the proof is already known valid before
this call, so it is possible that the assertion fails because the proof
has not be oprhaned yet.
This diff waits for the proof to turn orphan to fix the test.
Ref T1611.