Is this a bug?

I think it is a bug, because it works as expected when going though the query engine