And end location information to IID map and fix function call IIDs.

Patch by Stefan Heule.