Check for circular saved-state hierarchy before opening the output file for writing.  This avoids overwriting the existing parent file with an empty file.
Check for circular saved-state hierarchy before opening the output file for writing.  This avoids overwriting the existing parent file with an empty file.

git-svn-id: 98787b36aaefbae4b30fa755be920954cd25e1e4@829 ae7d391e-3f74-4a2b-a0db-a8776840fd2a

dcjm/polyml,polyml/polyml,dcjm/polyml,polyml/polyml,polyml/polyml,dcjm/polyml,polyml/polyml,mn200/polyml,mn200/polyml,mn200/polyml,dcjm/polyml,mn200/polyml