I feel such a prat!!
I have just been through the code with a fine tooth comb.....and found that the group in the AD was Gpffs not Gbffs!! I thought I was going mad.....which is probably still the case!