Fixed the function to find a requirement in a requirement tree