Checked junction tree creation.