Revert "Reduce duplication"
This commit introduced some hard-to-track crashes into kdev-python.
I haven't really checked why, but apparently behaviour changes
through this refactoring.
This reverts commit 6d835b3aa5be6f9efe3d15487236e0daa6fa5c23.