Correctly export environment before reading build and user properties