I am sorry. I copied the wrong function which had worked. Can you try my(func: has(<XYZ>)) { ?
my(func: has(<XYZ>)) {