Fix handling of top-level methods in max-method-arity rule

Fix creation of qualified names for the top-level methods