Fixed handling of 'optional' properties in translation to SPARQL.