Ensure calling as_list() on a reference to a non-array is an exception.