Fixing a logical error causing a panic in some very rare cases

Created by  pmeunier  on May 2, 2021
JIQOPUYH6IHOLTTUMFUXGYCEFM5NAFKUFF3GFUKOXJA5FZLDM76AC
Change contents