bug #4087 Undefined index query