[DROOLS-293] fix ObjectTypeNode id creation and comparison
(cherry picked from commit 6bc9677bbe919cd5bcadd8af2f5b0c838757a4ce)