This fixes the issues we've uncovered after landing r212815. Reviewed at http://reviews.llvm.org/D4500 llvm-svn: 213053
Reviewed at http://reviews.llvm.org/D4459 llvm-svn: 212699