I introduced a bug in pull request #925 by asking that a function be called before it was defined. This pull request fixes the issue by changing the order in which those commands are given.
The bug I introduced will likely annoy a lot of people a lot until this fix is pulled.
Sorry, and hope this takes care of everything...
Fixed bug introduced when fixing issue 896