Thanks very much for looking into this. Interesting observation re: Data::Dumper causing a similar error message. I didn't try to dump the structure so I didn't encounter that behavior.
I confirmed that calling clear will avoid the error on my system. If it works in my production code as well, I'll declare (partial) victory. I wonder what the root cause is, though.
Thanks for the idea.
Update: I tried this in my production code but it did not work. I also tried calling the unlock method, but to no avail.