As in Canada, liberal parliamentary gains show growing hostility toward the White House’s America First strategy.