layers: Fix Windows build
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 0f8c0dd..b1fc3f9 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -13398,8 +13398,8 @@
             break;
         case VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT:
             if (!enabled_features.attachment_feedback_loop_layout_features.attachmentFeedbackLoopLayout) {
-                auto vuid = (rp_version == RENDER_PASS_VERSION_2) ? "VUID-VkAttachmentReference2-attachmentFeedbackLoopLayout-07311"
-                                                                  : "VUID-VkAttachmentReference-attachmentFeedbackLoopLayout-07311";
+                vuid = (use_rp2) ? "VUID-VkAttachmentReference2-attachmentFeedbackLoopLayout-07311"
+                                 : "VUID-VkAttachmentReference-attachmentFeedbackLoopLayout-07311";
                 skip |= LogError(device, vuid,
                                  "%s: Layout for %s is VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT but the "
                                  "attachmentFeedbackLoopLayout feature is not enabled",