Fixed issue in "swapToEndAndRemove" if two objects in the list had equal values