Fix a logic error; found by Ian Goldberg.