handle EINVAL in gc.c more gracefully