Issue with filtering on product of unfolded json field

Hi!
I got problem which i dont now is bug or something else, env is latest metabase version, as data source im using pgsql
it will be much easier just to show:

ERROR: column source.device does not exist
Position: 125

As you see im doing grouping by json unfolded field, it's working like a charm. But later if i want to filter based on that result, its losing somehow "definition" of that unfolded column and giving error, i guess on that later filter is treating unfolded column on sql like normal one but it doesn't exist

Is any way to handle this without storing data jsonless?