Change the owner of the items. The items are moved into the same folder of the new owner.
Change the owner of the items to a different member of the organisation and they can then be transferred back to the original owner. This must all be done in the same action to avoid the error.