fix Rd warning
add self-reference check in boolGate at c level #137