In the end (even the setup posted above stopped working after a restart) I had to remove networkmanager and use the /etc/network/interfaces file.
-- [network-admin] WEP doesn't work when setting key using network-admin https://launchpad.net/bugs/67152 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs