diff --git a/src/apply/ref.xsl b/src/apply/ref.xsl
index c1a7be4..32b92ff 100644
--- a/src/apply/ref.xsl
+++ b/src/apply/ref.xsl
@@ -66,7 +66,7 @@
-
+
@@ -200,6 +200,9 @@
+
+
@@ -234,4 +237,28 @@
($args, f:args( $fnref )) )" />
+
+
+
+
+
+
+
+
+
+
diff --git a/test/apply/ref.xspec b/test/apply/ref.xspec
index 86d0b2a..cc67ffe 100644
--- a/test/apply/ref.xspec
+++ b/test/apply/ref.xspec
@@ -68,6 +68,13 @@
+
+
+
@@ -281,6 +288,10 @@
+
+
@@ -296,6 +307,10 @@
+
+
@@ -313,6 +328,10 @@
+
+
@@ -330,6 +349,10 @@
+
+
@@ -347,6 +370,10 @@
+
+
@@ -419,6 +446,10 @@
+
+
@@ -448,6 +479,10 @@
+
+
@@ -470,6 +505,10 @@
+
+
@@ -494,6 +533,10 @@
+
+
@@ -523,6 +566,10 @@
+
+
@@ -545,6 +592,10 @@
+
+