OWL 2 QL reasoning part rewritten.