That's one of many local mins, where the values are so close that they flipflop. Watch the EP values change slightly, but you'll see like:
You are reforged for haste, and have a lot of haste. Your mastery EP is X, and your haste EP is .95X. If you add one mastery, you'll get more dps than adding one haste. When you reforge, it uses those values.
But, that CHANGES the values. Now you have a lot of mastery. Your mastery EP is Y, and your haste EP is 1.06Y. If you add one mastery, you'll get LESS dps than adding one haste.
You can, of course, just pick whichever one predicts the highest dps.
You can also go and force a priority, reforge, write down the dps, force another, reforge, write down the dps, etc. Personally if the difference is small enough, I will take the easier to play one, or the one that is better at aoe, etc, as those will result in more damage in practice. But if the difference is substantial I'll aim for whatever that needs.