diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index fce9d3b9560..b8809fe1e6f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -643,9 +643,10 @@ main(int argc, char **argv)
 		do_sql_command(g_conn, "SET quote_all_identifiers = true");
 
 	/*
-	 * Disables security label support if server version < v9.1.x
+	 * Disable security label support if server version < v9.1.x (prevents
+	 * access to nonexistent pg_seclabel catalog)
 	 */
-	if (!no_security_labels && g_fout->remoteVersion < 90100)
+	if (g_fout->remoteVersion < 90100)
 		no_security_labels = 1;
 
 	/*
@@ -11761,6 +11762,12 @@ findSecLabels(Archive *fout, Oid classoid, Oid objoid, SecLabelItem **items)
 	if (nlabels < 0)
 		nlabels = collectSecLabels(fout, &labels);
 
+	if (nlabels <= 0)			/* no labels, so no match is possible */
+	{
+		*items = NULL;
+		return 0;
+	}
+
 	/*
 	 * Do binary search to find some item matching the object.
 	 */