Experimenting in creative mode in 1.18.1, I have found that you can remove anvil penalties from an item with a grindstone created by repeatedly combing books enchanted with only the same single curse enchantment on them onto that same item - furthermore what seems to be even buggier is that sometimes a partial anvil penalty is left on other than the anvil penalty of 1 from the intital curse enchantment (so far I have only gotten a second anvil penalty that wouldn't remove itself when grindstoned).
Due to the above, although not a major bug by any means, I believe this is an unintended mechanic within the current version.
This is intended per the fix of MC-140236