OK - I learn something :-)
Is there an easy-to-spot (when suitably verbose logging is enabled) log message that the relevant C code produces, that makes it easy to verify that it gets called three times during this test ?  i.e. how can I check, when this test passes, that this isn't an illusion caused by the idempotent lock being smart enough to notice it didn't need to attempt the second pass on .expected ?