Don't save invalid flag data, fixes #436

The Flag Command was resaving flags even if they were removed... that's
bad! Will now not resave if the flag was removed.