[WIP] Race condition in concurrent cache invalidation

This is a non regression test to reproduce #92. No fix yet as it is probably quite complex to get right in a cross-platform manner.