Site conditions determine a key native plant's contribution to invasion resistance in grasslands.