Attempt to make name enumeration deterministic - part two.

More attempts at making object/method iteration deterministic - these
should be reviewed for correctness/performance impact.