Fixed reference count error when looking for functions in an Object's prototype