Bug 1064678: searching for tracking flag "is empty" is generating incorrect sql