Fix issue with inputs() and plugin models.

inputs() should not trigger errors when generating inputs for plugin
models. Previously the internal state of FormHelper was incorrect as
model() returned the plugin name instead of the modelname.

Fixes #3571