fix a bug introduced when fixing #438208 and reported by Ashwin fix an

* tree.c: fix a bug introduced when fixing #438208 and reported by
  Ashwin
* python/generator.py: fix an infinite loop bug
Daniel

svn path=/trunk/; revision=3733
3 files changed