Spells that identify the player's entire pack will not immediately collapse stacks together. This may depend on whether or not the player's pack is currently visible; I have an extra window open to show inventory/equipment, and my stacks collapsed together when I hit ^R (to redraw the screen). The spell should collapse stacks together and then force a screen redraw.
ToME Wiki