More robust assertions for #661