Fixed issue with OData call inside recursive function