Summoning of a monster ends resulting in stati error box appearing
This is because items a summoned monster has, have a SUMMONED stati which refers to the summoned monster. When the monster is unsummoned (resting or duration expended), it's items are removed. When an the monster is removed, its backrefs are cleared (as is the case for all removed objects), but the attached stati on the item which had a backref is left in place as the item is marked as deleted (has been removed) at this point. Removed objects are not destroyed immediately, but are put in a queue.
When the item comes up in the queue, its SUMMONED stati is removed, but the backref is not found on the monster at this point. Error happens pointing this out.
Ideally, the removal of the object should remove the stati from the item and that should remove the backref from the monster. However, the reason it works this way, is to prevent recursive stati removal or something.. so.. maybe not.
In the long term, that might be something to revisit. But in the short term, just checking for deletion and not showing the error will be the safe (and not any worse) way to go.