Test and fix rendering of multiple input fields in has_many.

Resolves #3525.  Resolves #2108.