Legend of an expression when I have more than 2 references to queries

There seems to be an issue with the legend of an expression when I have more than 2 references to queries in a single expression.

it somehow appends the query object of the last reference to the legend. Is there a way to exclude that from the legend or am I missing something?
Screenshot from 2023-11-22 11-40-25