Add test_filter_recursive_stops() to assert recursion stops when the base case is reached.