Don't source functions multiple times

Fixes #117
Merge pull request #118 from mdlerch/global_fix_multiple_sourcing

Don't source functions multiple times