[DROOLS-44] when collecting declarations for a given scope skip the ones coming from an OR branch
(cherry picked from commit a61c41aca0561ccd67d55463c5e5b960de1be3ad)