list_templates: fix off-by-one error in list limits