Merge pull request #13354 from DougGregor/refactor-associated-type-inference