Check that all variables appearing in a rule's head also appear in its body.