change the way of searching reference node when parsing boolean gate
reslove cherry-pick conflicts
prevent the self-referral boolean gate