anchor.diff:              TemplateId
       end.
   
  -find_escript_templates() ->
  -    [{escript, Name} || {Name, _Bin} <- erlang:get(escript_files),
  -                        re:run(Name, ?TEMPLATE_RE, [{capture, none}]) == match].
  +find_escript_templates(Files) ->
  +    [{escript, Name}
  +     || {Name, _Bin} <- Files,
  +        re:run(Name, ?TEMPLATE_RE, [{capture, none}]) == match].
   
   find_disk_templates() ->
       OtherTemplates = find_other_templates(),
  
positive.code:     create(Config, File).
  
  'list-templates'(_Config, _File) ->
      %% Load a list of all the files in the escript -- cache it in the pdict
      %% since we'll potentially need to walk it several times over the course
      %% of a run.
      cache_escript_files(),
  
      %% Build a list of available templates
      AvailTemplates = find_disk_templates() ++ find_escript_templates(),
      ?CONSOLE("Available templates:\n", []),
      lists:foreach(
        fun({Type, F}) ->
                BaseName = filename:basename(F, ".template"),
                TemplateTerms = consult(load_file(Type, F)),
                {_, VarList} = lists:keyfind(variables, 1, TemplateTerms),
                Vars = lists:foldl(fun({V,_}, Acc) ->
                                           [atom_to_list(V) | Acc]
  
negative.code: 
      %% Load the template definition as is and get the list of variables the
      %% template requires.
      TemplateTerms = consult(load_file(Files, Type, Template)),
      case lists:keyfind(variables, 1, TemplateTerms) of
          {variables, Vars} ->
              case parse_vars(Vars, dict:new()) of
  