Environmental policies and public opinion: what a difference a by-election makes