PHOENIX-933 Local index support to Phoenix

Updated pull request after resolving conflicts and handling James review comments.
Just move the check for the index being a local index outside of the loop (and skip that index in that case). We should never match based on the column name.