The newer firmware I compiled a couple of night ago did not work. The old firmware, compiled with the latest Arduino-ESP8266 combo, did not work either!
So, the problem lies either in the 1.6.4 combo or the OneWire.h library. Or both.
I can't speak for 1.6.4 vs 1.6.1, except that the resulting binary firmware is larger with the latest GUI version. 46% vs 36%, that's a lot, but I should check the actual value in bytes.
Then OneWire.h library was modified to use the internal pull-up resistor in the ESP8266 microcontroller. I think that is quite wrong since the 1wire specification calls for a 4k7 pull-up resistor while nobody really knows the internal R value, that can vary in the future too. Moreover the new pinMode setting breaks existing implementations - like mine - that diligently used the external resistor.
I reverter to the 1.6.1 compiler and the original 1wire library, with the result that my newer firmware compiles, it is small, and it works.
I added a second loop counter to distinguish between counts from power-up and counts since the last TCP o WiFi failure.