Fixes a bug in jump to definition

If the definition was in another file, the jump would not take place.
This adds a regression test and the feature itself. For other
projects it is not clear this will work. Once the new project parsing
infrastructure is in place another test should be added.