Don't worry, it definitely doesn't "get thrown in the trash". The bonus 20 Lore is stored and applied as soon as you choose a spell, and if you pick a spell that has a lore cost of less than or equal to that 20, it will immediately finish researching. Allowing you to pick another spell on the same turn.