Revert "Fix several name reference rules."

This reverts commit 91f2e88e0f02a6542d1239424dd5a26f288e65d5.