Santize terms when linking all variations. Closes #2917