Changing spec order makes optimal stat distributions disappear?

9590fe62d47a4201b9af2c19210ec7c6

As you can see from the above snapshot, my Hunter has an optimal all green stat distribution when Beastmastery is in the second position after Survival.

72b575c2365741d799ad3e73ec24a486

Change Beastmastery to priority one, and bam, I lose 0.03% DPS and, more importantly, with the same items in my bags, I suddenly have no gear that gives an optimal stat distribution!

I understand that the order matters; it matters in determining what kind of gems or enchantments I apply if I have only one high iLvl piece of armor for certain slots and so on, but if I have multiple pieces of armor for almost each slot, and I have a gear set that gives an optimal stat distribution for a certain spec, why would the order matter in this case, especially in this strange way?

Is this a bug? If not, then what is the reason I don’t have an optimal Beastmastery stat distribution when it is priority one?

I’m not sure why it want’s to change the neck item… something to do with the gem/enchant threshold. It probably shouldn’t change the neck item. If you lower the threshold on gem/enchant to 0.25%, it seems to do a better job.