There are different inventory display modes (don't remember the key to cycle through them), but the modes are things like display all, display magic, display cursed, display equipped, etc. Chances are you accidentally switched into one of these states. So it is not a bug.