make last_uid a defaultdict
long-due update to unittests!

So we're safe under the green lights before further rewriting.
:)