Recursion induced threading problems