Better error print for bugs, triggered by #232