Fix unfortunate misplacement of an if statement in previous commit.