This reverts commit eb9f7c28. Previously this was incorrectly handling linking of the contained type, so this merges the fixes from D88973.