Avoid different results in debugger

This fixes this ticket: https://rt.cpan.org/Ticket/Display.html?id=97052

I added a regression test.
More MANIFEST.SKIP fixes
Make this module thread-safe!

The only thing stopping it was a static global variable, which I
eliminated.
Version 0.29