issue #1100: HAS() fails on doc[attribute_name]