(maint) Correct typo in loader helper class and add tests
Loading the same function multiple times from modules caused
an error because of a typo in NamedEntry. This adds tests for the
helper classes basic functionality, and adds tests that loaders indeed
can load a function more than once.
This also corrects error handling (yet another typo) when a function was
redefined (the wrong method was called).