fix #123: selection is not respected when branches contains a formula