For some reason (I could not reproduce this in unit tests alas), the unsubscribe function could be called several times in a row, leading to a complete map freeze. Closes #1736