Improved the efficiency of the LastIndexOf overloads