More work on criteria->sparql compilation