BS-8277
Fix dandling references after migration from v5
BS-8270
export query expressions