fixed buildExpandBindingQuery()