This issue occurred on v0.13.1, so apologies if it may have been fixed (I did a search of issues and pulls and didn't see anything obvious).
The issue is that the change address selected (by the software) was an address that had previously been used in the wallet, and so caused BTC to be sent to an address that had already been spent from (which I understand means reduced security of the bitcoins, as well as loss of privacy).
possibly fixed by #9377 - although rpc wasn't used in creating the tx (it was created using the usual send and coincontrol gui in bitcoin-qt)