Incorrectly assigned comments to discussions on diffs

On a merge request

  1. you start a discussion on a specific line of diff
  2. then you force pushed that line with new code.
  3. If you decide to write a comment in the first discussion (with stale code) to write down what you changed the code the comment is added to a discussion in the active diff.

Other similar case is

  1. you start a discussion on a specific line of diff
  2. then you force pushed that line with new code.
  3. Without refreshing the page you write a new comment in the discussion, a discussion is created on the new diff.
  4. If you write a comment in the first discussion the comment is added to the discussion on the new diff.