--- a/src/function.h
+++ b/src/function.h
@@ -89,9 +89,7 @@
         {
         case '(':
           {
-            std::list<octave_value_list> args (idx);
-            args.push_front (octave_value (new function (*this)));
-            retval = feval ("feval", args, nargout);
+            retval = do_multi_index_op (nargout, idx.front ());
           }
           break;
 
@@ -110,6 +108,16 @@
       return retval;
     }
 
+  octave_value_list
+  do_multi_index_op (int nargout, const octave_value_list& idx)
+    {
+      octave_value_list retval;
+      std::list<octave_value_list> args (1, idx);
+      args.push_front (octave_value (new function (*this)));
+      retval = feval ("feval", args, nargout);
+      return retval;
+    }
+
  private:
 
   std::string str;