Template dialog: Show up to the limit of parameters, not up to the limit + 1

Bug: 70609
Change-Id: I26dc9c17fe7572d7b864000781fff6583edf9f9b
Merge "Template dialog: Show up to the limit of parameters, not up to the limit + 1"