On Feature Learning in the Presence of Spurious Correlations