Fix list_length() being off by one