diff --git a/src/cc65/expr.c b/src/cc65/expr.c
index 66c633d2e..c932ba622 100644
--- a/src/cc65/expr.c
+++ b/src/cc65/expr.c
@@ -2793,6 +2793,9 @@ static void hie_compare (const GenDesc* Ops,    /* List of generators */
                 }
             }
 
+            /* Get rid of unwanted flags */
+            ED_MakeConstBool (Expr, Expr->IVal);
+
             /* If the result is constant, this is suspicious when not in
             ** preprocessor mode.
             */
diff --git a/src/cc65/exprdesc.c b/src/cc65/exprdesc.c
index e82d0fafc..f5d8cd779 100644
--- a/src/cc65/exprdesc.c
+++ b/src/cc65/exprdesc.c
@@ -261,7 +261,7 @@ ExprDesc* ED_MakeConstBool (ExprDesc* Expr, long Value)
 {
     Expr->Sym   = 0;
     Expr->Type  = type_bool;
-    Expr->Flags = E_LOC_NONE | E_RTYPE_RVAL | (Expr->Flags & E_HAVE_MARKS);
+    Expr->Flags = E_LOC_NONE | E_RTYPE_RVAL | (Expr->Flags & E_MASK_KEEP_MAKE);
     Expr->Name  = 0;
     Expr->IVal  = Value;
     Expr->FVal  = FP_D_Make (0.0);