Fix weird form state on validation error (bug 828015)