Since only active addresses should be preferred there is ambiguity here. The best way to handle it is to upload the status of A on the address if you want it to be preferred. If you don't want to set the address as active, leave the preferred flag blank.

If the second preferred address was created or updated before moving to version 5.0.18 then it might be the result of another issue that was fixed since then.