Slight speed improvement in removeDuplicatesFromSortedArray()

Change-Id: Id3900a4b5afde164807e3b25c9954d75c8f23c95