Hello. This is just a guess, but your observation may not be a bug. You have to be aware that every time you spend an ideology point, the cost for the next ideology point is raised. Not just in the branch you've spent that point in, but also in the other branches. If you accumulated just enough pragmatic points to use an ideology point there, but then use an ideology point in another branch, the cost for using the ideology point in the prgmatic branch may be raised beyond the amount of accumulated points.
You can see the accumulated points by hovering your mouse over the ideology headers, and the cost for your next ideology point by hovering over any of the traits you can buy.