Stabilising selection in constant and fluctuating environments