PHOENIX-933 Local index support to Phoenix

This code needs to be in the scanOrdered code block as well. How about factoring this outside of the call to scanOrdered/scanUnordered and passing the necessary info through both calls?