diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index ab3d8d00b7549c252f2d2cf6189cda97fc4776ae..a3101d7ea73bf5c487b51c2a6dd5311068c258a4 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -196,8 +196,8 @@ create_index_paths(PlannerInfo *root, RelOptInfo *rel)
 			add_path(rel, (Path *) ipath);
 
 		if (ipath->indexinfo->amhasgetbitmap &&
-			ipath->indexselectivity < 1.0 &&
-			!ScanDirectionIsBackward(ipath->indexscandir))
+			(ipath->path.pathkeys == NIL ||
+			 ipath->indexselectivity < 1.0))
 			bitindexpaths = lappend(bitindexpaths, ipath);
 	}