Changed the address where we store card data to 0x006000.  This makes it work, the master keycard data withstands the erase_database function.