bugfix for 10472 - lastIndexOf(string, string) does not find single character string at beginning of string

http://d.puremagic.com/issues/show_bug.cgi?id=10472

and some whitespace to follow code guidelines