Fix method name detection for special function names.