Fix handling of "index" methods in the form interface generator. Fixes #308.