diff --git a/src/array.c b/src/array.c
index 24386c69043e0b7ce9174485444e1b3bdf68e728..bee20d05f7b249f4a8d5cbda9c1e226fa5a29d0d 100644
--- a/src/array.c
+++ b/src/array.c
@@ -23,7 +23,7 @@
 #include "stuff.h"
 #include "bignum.h"
 
-RCSID("$Id: array.c,v 1.60 2000/02/02 00:37:21 hubbe Exp $");
+RCSID("$Id: array.c,v 1.61 2000/02/17 18:57:36 hubbe Exp $");
 
 struct array empty_array=
 {
@@ -455,11 +455,15 @@ INT32 array_search(struct array *v, struct svalue *s,INT32 start)
 
   check_destructed(s);
 
-  /* Why search for something that is not there? */
 #ifdef PIKE_DEBUG
   if(d_flag > 1)  array_check_type_field(v);
 #endif
-  if(v->type_field & (1 << s->type))
+  /* Why search for something that is not there? 
+   * however, we must explicitly check for searches
+   * for destructed objects/functions
+   */
+  if((v->type_field & (1 << s->type))  ||
+     (IS_ZERO(s) && (v->type_field & (BIT_FUNCTION|BIT_OBJECT))))
   {
     if(start)
     {