Add safety code when creating i-tree region/code pairs for display