Ingroup favoritism overrides fairness when resources are limited