If literals occur in both the body and head of the rule then they can be removed from the head. E.g. if you have
?X:"Person" AND ?X["hasName"->?N] :- ?X:"Person" AND ?X["hasLastName"->?N].
then this rewriter eliminates the "X:Person" in the head and replaces the rule by
?X["hasName"->?N] :- ?X:"Person" AND ?X["hasLastName"->?N].
It is recommended that you leave this optimizer always activated.