Court nixes Trump policy of tying grants to enforcement