When running "Create measure from time selection (detect tempo)" or "Create measure from time selection (new time signature)" on measures than contain lots of closely spaced tempo markers (for example, after importing a tempo map from Melodyne) I often see the bar lines shift incorrectly.
It seems that the tempo is calculated incorrectly if there is a tempo marker close to the right edge of the time selection:
Tempo calculated correctly if no tempo marker in-between (the second envelope line is playrate, which is 1.00x):
With tempo marker safely far enough away from end:
With tempo marker too close to end: