Global gravitational instabilities in discs with infall