Oh, nevermind. Thank you for finding that; I had made that change when testing what each field in spell.mes actually did. heh.
Ok, I found a function (accessed when doing the levelup spell selection) that checks for the range [802, 813] and also [1604, 1615]. I'll be investigating the code itself, but sometimes just jumping in and testing the spells could be quicker Also I've found that when you use the scroll, it somehow sets the spellIdx to 0 (instead of 803). So that's what must cause the crash.
FWIW as of version 1.0.12 Temple+ will support spell enums from 814 to 3999. (finally ) I'll also use this opportunity to reserve the range of 3000-3999 to class abilities spells / spell like abilities... edit: 1604-1613 are likewise reserved for internal usage (they are used as dummy spell enums for sorting the "new spell list" on leveling up sorcerers/bards). 802 denotes "vacant slot" and 803-812 denote the "Spell Level x" labels (where x is the spell enum minus 803).
I think I'll leave that honor to @bradrinwi It seems like adding new classes is the wall of death for DLL hackers let's see if I can make it...