It’s not a problem with the 1.166.4 update. It’s a problem with the automatic updater.
TL;DR: Permanent solution: stop using docker and storagenode-updater.
Long version: The updater checks if the new version should be downloaded. It checks this using the cursor and the version. If the node is in the cursor (ie it’s its turn to update), it downloads the new version and tries to restart the node. There is a small window where the cursor goes blank between updates. The storagenode-updater doesn’t know how to handle a blank cursor, and assumes that the minimum version should be downloaded instead. It downloads this version and restarts the node. The node then goes into a loop because of a database missmatch.
Edit to clarify: If the node does get downgraded, it cannot be upgraded again until the cursor tells it to.
This is the reason why there is a database mismatch and the nodes being downgraded.