Index: engine/worm.c
===================================================================
--- engine/worm.c	(revision 2383)
+++ engine/worm.c	(working copy)
@@ -298,6 +298,7 @@
 	   */
 	  if (worm[str].color == OTHER_COLOR(color)
 	      && worm[str].attack_codes[0] != 0
+	      && worm[str].attack_points[0] != pos
 	      && worm[str].defense_codes[0] != 0) {
 	    int dcode = find_defense(str, NULL);
 	    if (dcode < worm[str].defense_codes[0]) {
@@ -343,7 +344,8 @@
 	   * pos.
 	   */
 	  else if (worm[str].color == color
-		   && worm[str].attack_codes[0] != 0) {
+		   && worm[str].attack_codes[0] != 0
+		   && worm[str].defense_points[0] != pos) {
 	    int acode = attack(str, NULL);
 	    if (acode < worm[str].attack_codes[0]) {
 	      int defense_works = 1;
@@ -785,23 +787,6 @@
 	if (defense_point != NO_MOVE)
 	  change_defense(str, defense_point, dcode);
       }
-      else {
-	/* If the point of attack is not adjacent to the worm, 
-	 * it is possible that this is an overlooked point of
-	 * defense, so we try and see if it defends.
-	 */
-	attack_point = worm[str].attack_points[0];
-	if (!liberty_of_string(attack_point, str))
-	  if (trymove(attack_point, worm[str].color, "make_worms", NO_MOVE)) {
-	    int acode = attack(str, NULL);
-	    if (acode != WIN) {
-	      change_defense(str, attack_point, REVERSE_RESULT(acode));
-	      TRACE("worm at %1m can be defended at %1m with code %d\n",
-		    str, attack_point, REVERSE_RESULT(acode));
-	    }	 
-	    popgo();
-	  }
-      }
     }
   }
   gg_assert(stackp == 0);
@@ -854,7 +839,8 @@
       /* Try to defend at the liberty. */
       if (!defense_move_known(pos, str)) {
 	if (worm[str].defense_codes[0] != 0)
-	  if (trymove(pos, color, "make_worms", NO_MOVE)) {
+	  if (fastlib(pos, other, 0) != 1
+	      && trymove(pos, color, "make_worms", NO_MOVE)) {
 	    acode = attack(str, NULL);
 	    if (acode != WIN)
 	      change_defense(str, pos, REVERSE_RESULT(acode));
