Trap stack overflows and give a meaningful error message

SOs are most likely caused by inadvertant mutually recursive variable
definitions.  Help out the user by giving them a message like:

"recursive definition of variable '" + name + "' detected"