Okay, card data is successfully being saved to flash memory.  I am now able to enter MASTER mode by swiping my MaineCard.  It keeps its memory when I shut the device off, as it should.  However, deleting a user appears to be wiping out all card data, because when I remove a user from the database, the device no longer sees that we already have master keycard data stored.  Perhaps I miscalculated the number of instructions that my erase_database function erases.