2011/2/28 Morten Wang <nettrom@gmail.com>
seenCategories = set();
# then in my loop:
  if not cat.title() in seenCategories:
      seenCategories.add(cat.title());
      # do something with this category


I think the "if" line is not necessary here because of definition of sets. Just add.
I try to discover this part in pagegenerators. Either the script should detect if a category comes for processing the second time and tell him not to be so greedy, or it should detect the depth of recursion in an except RuntimeError: and step back one.