There is a bug, but it's not what you probably think.
Bones come in stacks. You know this.
The way this is represented in code is similar to the data type in coding called an "array". Basically, an individual item is an "object" (Specifically a pointer to an object but you don't need to know that), and objects have properties. One of these properties is the fact that it is, in fact, a bone, and allows jobs and such to find those items and use it. An array is a list of objects that you can reference with just one name. So instead of having to declare "bob", "joe", "chelsea", and "adam" individually, you'd declare "bob[4]" and then you can ask for bob[0], bob[1], bob[2], or bob[3]. (Arrays start at 0, and most things in code start at 0, instead of 1 like you'd think. It's weird, but irrelevant.)
A stack of 4 bones from a puppy looks like bone[4], and you can reference specific bones from that list. When a job asks for bones, it goes and finds a stack of bone, and then the job will consume one of those bones. It's been consumed, so the game deletes it from the "array".
What happens is that when you use up all the bones in the stack, you have what's called a null data reference, where the array doesn't actually hold any information at all. It SHOULD delete itself, but for some weird reason, you end up with a stack of zero bones. This object has no use in the game, except to be atom smashed. The problem, however, is that it LOOKS identical to a stack of 1 bone.
Dwarves stockpile stacks of 1 bone differently from stacks of 0 bones. I forget exactly how it works, but I know that it does. What I do is I have every bone stack in the fort forbidden, except for the one I'm working at the moment. When it gets to 1 bone left, I'll have it sent back to the stockpile and then forbidden, so that I know it has a bone left in it. When an artifact asks for bones, I'll unforbid one of these single-bone stacks, because they get wholly consumed by artifacts (but not by other jobs, for some reason.) If all you have in the fort are stacks of 0 bones, then the dwarves won't actually be able to find bones, and will be sad until they kill themselves.