Revert "NXP-13409 regression in duplicate name detection"

This reverts commit 7322ad521a25c106eb538b40938c0fdd0286dfda.