When a file template rule is evaluated against a particular buffer it is supposed to call the :when function if it is defined. Currently, the function is ignored if the PRED of the template rule is a mode. This fixes this issue.