Fixed bug where empty input list breaks template

Do not reject a template just because the input is an empty list, if the input is not contained within an ellipsis. The code was interpreting this as a zero-match case, which is impossible if there is no ellipsis.