Avoid spurious error messages if parent template class cannot be instantiated

Differential Revision: http://llvm-reviews.chandlerc.com/D924