Added support for flattening of multiple chained selects and wheres in RestQueryProvider.