Fix bug when defining an instance method inside a singleton class (class <<) body