Fix memory addressing and SPARQL in XMP-related code.