Fix error with joinfields (issue #7068)

fix error when labeling joinfields or make thematic maps with spatialite files