When you put a new battery in your flashlight, the old one pops out into your inventory, and probably onto the floor if your inventory is full.Otherwise, no clue.
Happens to me too, especially noticeable when entering Hunter's Dream