Merge "Using treed_read/treed_write functions for segment ids." into experimental