Refactored `ensureMethodNameUniqueness()`