swanctl: Fix enumeration of registered commands if MAX_COMMANDS is hit