The way get_immediate_parent is implemented, if a bucket/item is found in multiple buckets it will always return the last one. This is fine when the crush map describes a simple hierarchy but that will lead to unexpected results otherwise. Returning the parents hierarchy may be counter efficient for the purpose of this patch series. 
Maybe we don't care because few ( if any ? ) people use crush maps that are not simple hierarchies. Maybe just a prominent warning ?