Detecting high-z galaxies in the near-infrared background