Fix method duplicate checking.