Easiest steps to reproduce:
1. open command line and execute command: set xx=%xx%
2. start TC from this command line
3. type into command line: echo %xx%
4. press Enter and enjoy hung TC!

This example is funny, but it is real that some envvars may point to others and back, so loop may occur. I think it would be good to integrate some counter in resolving loop.