Fixed 19949 -- Cached template loader now caches TemplateDoesNotExist

Thanks @timgraham @jdunck for the code reviews. Thanks Kronuz for bug
report and initial code patch.