This is an attempt to mitigate #978. I'm not really sure if it'll work, but seems like it's worth trying!