It should copy the original items.permanent_location rather than items.location.
This explains a lot. Please fix.
This explains a problem I just encountered for the first time today. It would be good if it were fixed.
Still valid, tested on current development version.