policy: check device state before changing it for secondaries (rh #1055099) team: fix crash in teamdctl (rh #1076469)