semantic: Correctly insert reference struct in no ref nests.