throw a Twig_Error_Loader when calling getSource() on a template which is not found. This is the expected behavior of a Twig loader. The previous implementation was triggering a notice for non-matching names and trying to get the content of a non existent file for non-existent paths (which triggers a warning).
update the exists() implementation to update the internal cache for matched names to avoid a second file_exists check later when getting the source due to the fixed implementation.