Improved palette index lookup for pixels that would result in full palette search.
Improved palette index lookup for pixels that would result in full palette search.

drewnoakes/nquant,Crazycatz00/nQuant,philjones/nquant,KimikoMuffin/nQuant,Crazycatz00/nQuant