Don't source functions multiple times

Fixes #117