The checks for calling outliner flushing didn't account for entering pose mode for the first time or that pose-bone selection can also change the object selection. Resolve by recording what changed and refresh accordingly. Also de-duplicate calls to DEG_id_tag_update.