Revert "Cache names in NameManager"

This reverts commit bd0a40e16cb6568d5b56668b6d6b56e144d6ef1b.