diff --git a/mollom.module b/mollom.module
index 0113c5f..6ad6654 100644
--- a/mollom.module
+++ b/mollom.module
@@ -726,9 +726,6 @@ function mollom_form_alter(&$form, &$form_state, $form_id) {
         '#weight' => (isset($form['actions']['#weight']) ? $form['actions']['#weight'] - 1 : 99),
         '#tree' => TRUE,
       );
-      // Enable caching of this form; required for our form validation and
-      // submit handlers.
-      $form_state['cache'] = TRUE;
 
       // Add Mollom form validation handlers.
       // Form-level validation handlers are required, since we need access to
@@ -1769,6 +1766,12 @@ function mollom_validate_analysis(&$form, &$form_state) {
   // since this is not a element-level but a form-level validation handler.
   $form['mollom']['contentId']['#value'] = $result['contentId'];
 
+  // #type 'input' accepts #input, but actual user input is ignored. In case of
+  // a form validation error, the form is potentially built and processed again
+  // in order to be re-rendered. In that case, we want the user-exposed hidden
+  // input fields to contain the IDs returned by Mollom.
+  $form_state['input']['mollom']['contentId'] = $form_state['values']['mollom']['contentId'];
+
   // Prepare watchdog message teaser text.
   $teaser = '--';
   if (isset($data['postTitle'])) {
@@ -1934,6 +1937,12 @@ function mollom_validate_captcha(&$form, &$form_state) {
   // since this is not a element-level but a form-level validation handler.
   $form['mollom']['captchaId']['#value'] = $result['captchaId'];
 
+  // #type 'input' accepts #input, but actual user input is ignored. In case of
+  // a form validation error, the form is potentially built and processed again
+  // in order to be re-rendered. In that case, we want the user-exposed hidden
+  // input fields to contain the IDs returned by Mollom.
+  $form_state['input']['mollom']['captchaId'] = $form_state['values']['mollom']['captchaId'];
+
   if (!empty($result['solved'])) {
     $form_state['mollom']['passed_captcha'] = TRUE;
     $form['mollom']['captcha']['#access'] = FALSE;
diff --git a/tests/mollom.test b/tests/mollom.test
index b3cf50c..5b421b2 100644
--- a/tests/mollom.test
+++ b/tests/mollom.test
@@ -130,6 +130,11 @@ class MollomWebTestCase extends DrupalWebTestCase {
     // @todo Remove this override.
     variable_set('theme_default', 'garland');
 
+    // Force-enable (aggressive) page caching to resemble reverse-proxies.
+    variable_set('cache', 1);
+    variable_set('cache_lifetime', 60);
+    variable_set('page_cache_maximum_age', 180);
+
     // If not explicitly disabled by a test, setup and validate testing keys,
     // and create a default admin user.
     if (empty($this->disableDefaultSetup)) {
