[CAP-179] Fix the template to check the array length correctly.

https://issues.jasig.org/browse/CAP-179

Screens:

Before:
![cap-170_narrow_before](https://cloud.githubusercontent.com/assets/7871998/4687587/3de7e89e-5658-11e4-94be-aaa93e5e5a92.png)
![cap-179_wide_before](https://cloud.githubusercontent.com/assets/7871998/4687588/40e46838-5658-11e4-8dc5-d9c63fe63383.png)

After:
![cap-170_narrow_after](https://cloud.githubusercontent.com/assets/7871998/4687591/4a4fa702-5658-11e4-89e6-ed796b66ef04.png)
![cap-179_wide_after](https://cloud.githubusercontent.com/assets/7871998/4687593/530abba2-5658-11e4-8751-b0f37ddca818.png)