fix bug in handling unique fields as a return value highlighted by test
Merge pull request #1030 from eileenmcnaughton/master

fix api return bug highlighted by syntaxconformancetest