PR26237: Fix iterator invalidation bug that occurs if serializing specializations of a template manages to trigger deserialization of more specializations of the same template.
PR26237: Fix iterator invalidation bug that occurs if serializing
specializations of a template manages to trigger deserialization of more
specializations of the same template.

No test case provided: this is hard to reliably test due to standard library
differences.

Patch by Vassil Vassilev!

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@261781 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit e639f9c8bbde03a63afea2c1b4834c4536b1dbc8)

apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang