Very interesting that a read operation manages to corrupt the index. That makes it likely that it causes an overflow or similar memory corruption in an unfortunate place while reading. For example allocating a buffer based on the literal length of that path and then later expanding the variable?