Tracked down the source of the segfault.