As reported by @jerryneedell, this change was incorrect; the given ESPTOOL_FLAGS caused `write_flash` to be repeated twice, which doesn't work. Closes #3981.