Bug #114: made sure we reuse instances of functions