If you reset after getting the undefined it doesn't reset properly. The music doesn't change and you still have the undefined, but you can't use it.
You lose all the other spells, and you can't pick them up again. Also there's some kind of invisible block in the first room. Jump around and you should find it. Resetting again fixes everything.
Is this intentional?