Trying to fix #2378 which I can't reproduce, but unlikely