Fix segfault regression from r370681