Bugfix for when there's no form definition for download

Adds a test as well.

Fixes #287