The 20,000-note memory is definitely not what the 40,000 (JV1000) or 60,000 (XP60/80) are. That said, it still holds a lot of music, especially of the kind you've described.
What you may be experiencing is that the *buffer* is full rather than the song memory itself.
Each time you perform an edit or a function, the sequencer takes a snapshop of what you already have and adds that to the buffer so you can UNDO if you need to. Once your buffer gets full, that's it.
The next time you get a memory-full message, save your tune to diskette, reinitialize your sequencer (clear its memory for a new song), and reload your tune. You can also save the tune and then turn the synth off and back on again, since the buffer is volatile. That will clear the buffer/memory.
The problem I had with the XP50 (before I got an XP60) was that I had big (dense) songs -- which the XP50 held just fine -- but couldn't do big global edits because the buffer got full so fast for UNDO. The bigger the area you edit and is held in the UNDO buffer, the less memory is left.
See if this helps.