Fix saving of trial environment for trials

Reviewer: Daniel Jao (post-commit)

Issue: GCP-9745