Check whether functions can actually return in InstructionIndex.

This fixes #23, at least for the libgit2 example mentioned there.