Fix error in form export introduced in refactor to Sparql.