This is not a serious or fatal flaw. Here's why.
In its most general form the Kruskal-Wallis test is a test for (0$^{\text{th}}$ order) stochastic dominance among $k$ groups. That is, the null hypothesis is:
$\text{H}_{0}\text{: }Pr\left(X_{i} > X_{j}\right) =0.5$
for all groups $i$ and $j$ from $1$ to $k$, with the alternative hypothesis:
$\text{H}_{\text{A}}\text{: }Pr\left(X_{i} > X_{j}\right) \ne 0.5$
for at least one group $i \ne j$. Putting the null hypothesis into plain language, no stochastic dominance would mean that a randomly drawn observation from group $i$ is just as likely to be larger than to be smaller than a randomly drawn observation from group $j$, for any two groups. Putting the alternative hypothesis into plain language, the existence of stochastic dominance would mean that a randomly drawn observation from at least one group $i$ is more likely to be larger than to be smaller than a randomly drawn observation from a different group $j$.
These hypotheses make no assumptions about the shape, width or location of the distributions of the groups being compared other than within each group observations are independently and identically distributed (i.e. distributed i.i.d.).
Sometimes researchers want to use these tests (and other nonparametric tests) as tests for median difference (instead of tests for stochastic dominance). However, in order to interpret test results this way one has to make the additional assumptions that the shapes and widths of the distributions of all groups are the same except for location. If you must provide inference about median difference and one of your groups has a differently shaped distribution than another, then yes, this test is fatally flawed. But stochastic dominance is often a good enough kind of inference to make.