Fixed bug in mk_gen_of_def that could cause non-termination of the generator
for datatypes with nested recursion (such as trie).
By chapter:
chapters 1 and 2, maybe 3: Peter White
chapters 6, 7 and 8: David von Oheim
chapter 6, maybe 8: Gerwin Klein
chapters 3, maybe 4: Tanja Vos
chapters 1-3 at least: Stefano Bistarelli