Repeating panels not disappearing when selecting another variable value

I have set up a dashboard with a variable which can switch between two environments. Each environment has several targets: The first environment has one target, the second environment has three targets.
I have created a graph panel which repeats over the targets. When i select the first environment, only one panel is shown, which is correct. When i select the second environment, three panels are shown, which is correct. When i switch back to the first environment, there are still three panels shown. I would have expected the second and third panel to disappear. What’s my mistake here?

The dashboard has a prometheus data source, and the variables are defined as follows:

  • environment: label_values(ping_rtt_mean_ms, environment), no multi value, no include-all
  • target: label_values(ping_rtt_mean_ms{environment=~"$environment"}, target), no multivalue, but include-all