Replace WeakMap with random property

This has obvious disadvantages, but it does lend a speed-up over v0.9
and the closure-avoiding/WeakMap version.