Add missing return statement in duplicate name checking.