my $outer_attrs = { %$attrs };
delete $outer_attrs->{$_} for qw/where bind rows offset group_by having/;
- my $inner_attrs = { %$attrs };
+ my $inner_attrs = { %$attrs, _is_internal_subuery => 1 };
delete $inner_attrs->{$_} for qw/for collapse _prefetch_selector_range _collapse_order_by select as/;