diff --git a/bin/fake_dynamic_load.pike b/bin/fake_dynamic_load.pike
index d3653b1794f71060ca290d89126977db8adc01f6..f92b228f0e7dd711e57bde5b6ca2bf16e6970237 100755
--- a/bin/fake_dynamic_load.pike
+++ b/bin/fake_dynamic_load.pike
@@ -78,6 +78,11 @@ string low_strip_other_files(string data, string s)
 	    on = (dir == current_dir[sizeof(current_dir) - sizeof(dir)..]) ||
 	      (dir == source_dir[sizeof(source_dir) - sizeof(dir)..]) ||
 	      (dir == target_dir[sizeof(target_dir) - sizeof(dir)..]);
+	    if (!on) {
+	      // Special case for bison.
+	      on = (search(lower_case(file), "bison") != -1) ||
+		(search(lower_case(file), "yacc") != -1);
+	    }
 	  }
 	}