[analyzer] Fix a diagnostics bug which lead to a crash on the buildbot.

This bug was triggered by r157851. It only happens in the case where we
don't perform optimal diagnostic pruning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157950 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed