Scope elementFromPoint to the current TreeScope

Fixes #452
lastIndexOf seems conceptually more correct since searching from the leaf towards the root seems more logical.