env: correct overflow check of env_has_init size