[DROOLS-639] Multiple declarations from different packages are ignored or conflicting

(cherry picked from commit f9fd5125d6f4c84a835c97d411a8bb8b4181765a)
(cherry picked from commit b85fedaadd2f2f91c1e696a334eedd9ffa390c54)