Make sure function tracing doesn't end up in an infinite loop.