Oh joy - the original code didn't do mapping of the perms onto the wire.