Internalize common symbols when we can.

This fixes pr20974.