Add small fix for source maps
Merge pull request #775 from mgreter/fix/source-map-771

Add small fix for source maps
Improve and harden handling of edge cases in C-API