Make sure ENV instruction within build perform a commit each time

Fixes #1455