Fix jumping between definitions in the same buffer.

Fixes #632.