This looks good and much cleaner. I can see why this is not very reproducable!

Is it worth checking `isEqual(len(x), len(x_rec))` ~~or maybe `isEqual(x.keys(), x_rec.keys())` (sigh, this isn't a set in python 2)~~ which is implicitly done with the map ?