Apparently I don't know how to fix it

My UPS died today (god I hate APC) which means my Brocade shut down. On booting it up, it lost its licenses again. I get this:
1 Node Lock ICX6450-PREM-LIC-SW H4CKTH3PLN8 Normal Invalid Unlimited 1
2 Node Lock ICX6450-10G-LIC-POD H4CKTH3PLN8 Normal Invalid Unlimited 2
I've run through several times trying to add the licenses again but always end up at the same spot. Here are the last set of commands I've run:
Clear the license:
enable
license delete unit 1 all
write mem
reload
Add the serial number:
enable
hw pid-prom serial 2ax5o2jk68e
hw pid-prom clear-sw-lid
write mem
reload
Add the license:
enable
copy tftp license 192.168.2.161 ICX64xx/1-6450-prem.xml unit 1
copy tftp license 192.168.2.161 ICX64xx/2-6450-ports.xml unit 1
show license
write mem
reload
I can see in tftp that the file get accessed, the switch says it writes it, but the licenses always say invalid. I've tried using write mem and various stages, or only on the last stage. No difference.
Any idea how I can get the licenses to stick?