Make the code raise an error in the appropriate thread.
Find the constant in nesting and ancestors. It was only searching the nesting.