Fix segfault with enablelocallists=on