diff --git a/RELEASES.md b/RELEASES.md
index 83c7905c..55b4f897 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -20,6 +20,14 @@ Compiler
--------
- Make Summary Page less chatty.
- Fix incorrect package name for generated worksheet packages.
+- Restrict `TRUE`-match optimization to classification matches (class
+ composition).
+ - This was mistakenly not considering the domain of the match, and
+ therefore was applying the optimization in situations where it should
+ not. Results of previous classifications are currently the only place
+ we guarantee a boolean value.
+- Apply classification alias optimization to any `1`-valued constant match.
+ - Previously applied only to `TRUE`.
Summary Page
------------
diff --git a/src/current/compiler/js.xsl b/src/current/compiler/js.xsl
index 8cc6f8c6..8c97de86 100644
--- a/src/current/compiler/js.xsl
+++ b/src/current/compiler/js.xsl
@@ -541,7 +541,6 @@
-->
@@ -550,9 +549,18 @@
+
+
+
+
-
+
@@ -850,8 +858,10 @@
-
+
+
+
@@ -862,11 +872,6 @@
select="if ( $dim = 2 ) then 'NN' else 'N'" />
-
-
-
-
-
@@ -924,11 +929,28 @@
$match/parent::lv/classify/@as, '''' )" />
+
+
+
+
+
+
+
+
-
+
@@ -942,7 +964,7 @@
-
+
diff --git a/src/current/include/preproc/expand.xsl b/src/current/include/preproc/expand.xsl
index c4b3efb3..4c5302fd 100644
--- a/src/current/include/preproc/expand.xsl
+++ b/src/current/include/preproc/expand.xsl
@@ -596,9 +596,9 @@
-
-
+