Block Edit and Object table

I found a hackaround for this now:
When entering the block edit mode the selected block is not a normal object any more. So search for the selected block inside the OnBeginCommand function and store it. then afterwards you can check if the status of this object is still not normal. If it is normal again you are outside of the blockedit again

 private bool isLoaded = false;
        public static bool isInBlocKEditMode = false;
        public static Guid blockEditCommandId, thisCommandId;
        private static RhinoDoc _doc;
        private static InstanceObject blockToEdit;

        public IcLoadEventHandlers()
        {
            // Rhino only creates one instance of each command class defined in a
            // plug-in, so it is safe to store a refence in a static property.
            Instance = this;
        }

        ///<summary>The only instance of this command.</summary>
        public static IcLoadEventHandlers Instance
        {
            get; private set;
        }

        ///<returns>The command name as it appears on the Rhino command line.</returns>
        public override string EnglishName
        {
            get { return "IcLoadEventHandlers"; }
        }

        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {
            if(isLoaded)
            {
                return Result.Cancel;
            }
            _doc = doc;
            Command.BeginCommand += OnBeginCommand;
            Command.EndCommand += OnEndCommand;

           
            return Result.Success;



        }


        /// <summary>
        /// Called when a command begins
        /// </summary>
        public static void OnBeginCommand(object sender, CommandEventArgs e)
        {
            // TODO...

            if (isInBlocKEditMode)
            {
                if(blockToEdit != null)
                {
                    if(blockToEdit.IsValid && !blockToEdit.IsDeleted)
                    {
                        if(blockToEdit.IsNormal   )
                        {
                            blockToEdit = null;
                            isInBlocKEditMode = false;
                            RhinoApp.WriteLine("BlockEdit was cancelled");
                        }
                    }
                    else
                    {
                        blockToEdit = null;
                        isInBlocKEditMode = false;
                        RhinoApp.WriteLine("BlockEdit was cancelled");
                    }
                }
                else
                {
                    blockToEdit = null;
                    isInBlocKEditMode = false;
                    RhinoApp.WriteLine("BlockEdit was cancelled");
                }
            }
            String commandName = e.CommandEnglishName;
            if (commandName.Contains("BlockEdit") && !commandName.Contains("BlockEditApplyInPlaceEditItemChanges"))
            {
                IEnumerable<RhinoObject> selectedObjects = _doc.Objects.GetSelectedObjects(false, false);
                InstanceObject instanceObject;
                foreach (RhinoObject thisRhObj in selectedObjects)
                {
                    if (thisRhObj.IsSelected(false) != 0)
                    {
                        instanceObject = thisRhObj as InstanceObject;
                        if (instanceObject != null)
                        {
                            blockToEdit = instanceObject;
                        }
                    } 
                }
            }

        }

        /// <summary>
        /// Called when a command ends
        /// </summary>
        public static void OnEndCommand(object sender, CommandEventArgs e)
        {
            // TODO...
            String commandName = e.CommandEnglishName;
            if (commandName.Contains("BlockEditApplyInPlaceEditItemChanges"))
            {
                isInBlocKEditMode = false;
                blockToEdit = null;
                RhinoApp.WriteLine("exiting BlockEdit");
            }
            else if (commandName.Contains("BlockEdit"))
            {
                isInBlocKEditMode = true;
                RhinoApp.WriteLine("entering BlockEdit");
                //RhinoApp.WriteLine("entering BlockEdit");
            }
        }