Check if method was already cached before method definition.

In case of direct `method_missing` call (like here in Rails: https://github.com/rails/rails/blob/c449462f45d342258a01313c0ff46279d268719d/activesupport/lib/active_support/core_ext/array/conversions.rb#L216) cached method will be redefined each time. Commit fixes this behavior.