Simplifying recursive call conditions