diff --git a/spec.html b/spec.html
index 72c4edcbabd..27e69e5968d 100644
--- a/spec.html
+++ b/spec.html
@@ -34002,7 +34002,8 @@
1. Let _digits_ be the substring of _templateRemainder_ from 1 to 1 + _digitCount_.
1. Let _index_ be ℝ(StringToNumber(_digits_)).
1. Assert: 0 ≤ _index_ ≤ 99.
- 1. If 0 < _index_ ≤ the number of elements in _captures_, then
+ 1. Let _captureLen_ be the number of elements in _captures_.
+ 1. If 0 < _index_ ≤ _captureLen_, then
1. Let _capture_ be _captures_[_index_ - 1].
1. If _capture_ is *undefined*, then
1. Let _refReplacement_ be the empty String.