Asked around in chat about these, general consensus was it is a bug.
Penultimate turn (turn 36) in this battle: http://replay.pokemonshowdown.com/randombattle-126522847
Background: Omastar had used shell smash earlier in the battle, activating its power herb, so it was item-less. My specs...