Avoid error popups for closed tasks

see Dismissing task form for inexistent task