No, this is not a glitch. The Focus Sash is not a normal single use item, though in a regular battle in can only be used once. In Shedinja's case however, it cannot be used like that. Think about it - if it could be, Shedinja would be impossible to beat.
_____
So basically, Game Freak made it this way to prevent Shedinja from becoming impossible to beat.
Source: Experience + common sence.