There are a number of small state fixes in this PR, which result in the build dialog being properly reset state-wise each time it is displayed, thus fixing the state inconsistency. Fixes #2106
Fixes #774