From your description, I think there may be a need to refactor your code.

Since the child called a parent that called a child - etc. and you had to put in
a flag to prevent the infinite loop, this should be written in a way that
is not get into this situation.

BTW: Why did you create a list template when STL already has lists, queues,
etc. for you to use?

Note: Creating a small project that has the problem is a excellent way to
get help from CG. Everyone here can then download the problem code,
examine it, and debug it themselves. This is very helpful if the problem
isn't easy to find by examination.