Nice catch. However, chainActive should never be modified anywhere but in the thread calling this method (the message handler), so it can't be the cause for the segfault i observed (perhaps #4204 fixed it, though). I'll fix it.