Bugfixes for media edit form

The form would sometimes not work due to the validation plugin not being loaded.  It was also impossible to re-submit the form after validation failed.