Added check for duplicate names in forms.

fixes #51