Do not let mindmap overflow when calculating distributions. Fixes #215.