Attempt to fix windows file system issues without infinite loop

This is a kludge and can definitely be done better, but for now this is what happens when debugging without being able to reproduce the issue.