This is NOT working as intended. I have not named the axe in any capacity.
I am pointing out that naming the axe (which costs one level) will make the axe too expensive, which means that the enchantment cost is 39 without naming. This is well within the axe cost, and I even tested this with removing unbreaking III, which removes 5 levels from the enchantment cost. This is well within the cost, and not only does it refuse to enchant or tell me it's "Too Expensive", the text will flash as you add or remove an enchantment (or just rename and undo what you did).