Throw an error if a method is redeclared