Inconsistent Roster state: userA=none, userB=both

We have been seeing a recurring issue where a pair of users Rosters can get into a state that should not be possible.

Roster for userA has:

<item jid="userB@domain.com" subscription="none" ask="subscribe"/>

Roster for userB has:

<item jid="userA@domain.com" subscription="both" />

The environment where this occurred is using server version 3.9.1. After alot of experimentation, I have not been able to recreate how the two users reach this state. (with either 3.9.1 or 3.9.3) I noticed some fixed defects related to Roster management ( for example [OF-720] Roster deletion of userB by userA should not remove userA from userB’s roster - Jive Software Open Source ) but nothing that explains how this state could be reached.

Once this occurs, it is very difficult to fix since specification rules dictate that no subscribe or subscribed packets should be routed once the roster state is Both. The only way to fix it is to get the user who has state subscription=“both” on the roster to first remove the other.

The real question is wether this is a valid state for the server to be in? (I think the answer is no) And How could this happen?