When adding a course reserve item to a record, the holdingbranch is disappearing from the item once removed from the course.
When the item is assigned to a course, the permanent holdingbranch isn't being recorded in the course_items table. This is where the data should be stored for safe-keeping to be used when the item is removed from a course and needs to be flipped back to the original codes!
I just tested this on master and can't replicate the problem. Can you confirm this is still a problem in 18.05 or later?
I think this is a duplicate of bug 22142 - please undo if I was mistaken.
*** This bug has been marked as a duplicate of bug 22142 ***