diff --git a/src/partition_allocator/partition_allocator.c b/src/partition_allocator/partition_allocator.c
index ac7b911bb621453b71b3709169077a9c1bba37eb..58cd86d96736e5cc4d6fb5a1fe5db197a8715aca 100644
--- a/src/partition_allocator/partition_allocator.c
+++ b/src/partition_allocator/partition_allocator.c
@@ -2781,8 +2781,8 @@ static int _find_x_path(List results, pa_node_t *pa_node,
 					continue;
 				} else {
 					/* check Y and Z dims */
-#ifdef HAVE_BGL
 				found_path:
+#ifdef HAVE_BGL
 					debug2("added node %d%d%d %d %d -> "
 					       "%d%d%d %d %d",
 					       pa_node->coord[X],