Fixes #79 - Template function should have access to the extended prototype.