Either that or `encode_parent_item` looks suspicious in that it may be able to traverse upwards.