fix UPER decoding of large [bit-]strings of size a multiple of 16K
diff --git a/tests/tests-randomized/bundles/03-BIT-STRING-bundle.txt b/tests/tests-randomized/bundles/03-BIT-STRING-bundle.txt
index 2835b3c..f2d253e 100644
--- a/tests/tests-randomized/bundles/03-BIT-STRING-bundle.txt
+++ b/tests/tests-randomized/bundles/03-BIT-STRING-bundle.txt
@@ -17,3 +17,9 @@
 T ::= BIT STRING { foo(2147483648), baz(2147483647) } (SIZE(31,...))
 T ::= BIT STRING { foo(2147483648), baz(2147483647) } (SIZE(0..32))
 T ::= BIT STRING { foo(2147483648), baz(2147483647) } (SIZE(0..31,...))
+T ::= BIT STRING { foo(0) } (SIZE(65535))       -- RMAX=65540
+T ::= BIT STRING { foo(0) } (SIZE(65536))       -- RMAX=65540
+T ::= BIT STRING { foo(0) } (SIZE(65537))       -- RMAX=65540
+T ::= BIT STRING { foo(0) } (SIZE(65535,...))   -- RMAX=65540
+T ::= BIT STRING { foo(0) } (SIZE(65536,...))   -- RMAX=65540
+T ::= BIT STRING { foo(0) } (SIZE(65537,...))   -- RMAX=65540
diff --git a/tests/tests-randomized/bundles/04-VisibleString-bundle.txt b/tests/tests-randomized/bundles/04-VisibleString-bundle.txt
index ec03664..55a658b 100644
--- a/tests/tests-randomized/bundles/04-VisibleString-bundle.txt
+++ b/tests/tests-randomized/bundles/04-VisibleString-bundle.txt
@@ -16,11 +16,12 @@
 T ::= VisibleString (SIZE(1..128))
 T ::= VisibleString (SIZE(1..129))
 T ::= VisibleString (SIZE(5) INTERSECTION FROM("A".."Z"))
-RMAX=64000 VisibleString (SIZE(64000))   -- Length is not encoded, #11.9.3.3
-RMAX=33000 T ::= VisibleString (SIZE(32000..32002))
-RMAX=33000 T ::= VisibleString (SIZE(32000..32002)) (FROM("A".."B"))
-RMAX=33000 T ::= VisibleString (SIZE(32000..32002,...)) (FROM("A".."B"))
-RMAX=65536 T ::= VisibleString (SIZE(65530..65535))
-RMAX=65536 T ::= VisibleString (SIZE(65530..65536))
 T ::= VisibleString (SIZE(4..6) INTERSECTION (FROM("A".."B")))
 T ::= VisibleString (SIZE(4..6,...) INTERSECTION (FROM("A".."B")))
+VisibleString (SIZE(64000))                 -- RMAX=64000, #11.9.3.3
+T ::= VisibleString (SIZE(32000..32002))    -- RMAX=33000
+T ::= VisibleString (SIZE(32000..32002)) (FROM("A".."B"))       -- RMAX=33000
+T ::= VisibleString (SIZE(32000..32002,...)) (FROM("A".."B"))   -- RMAX=33000
+T ::= VisibleString (SIZE(65530..65535))    -- RMAX=65536
+T ::= VisibleString (SIZE(65530..65536))    -- RMAX=65536
+T ::= VisibleString (SIZE(65535..65550))    -- RMAX=66000
diff --git a/tests/tests-randomized/bundles/README b/tests/tests-randomized/bundles/README
index 29c1aab..e962eed 100644
--- a/tests/tests-randomized/bundles/README
+++ b/tests/tests-randomized/bundles/README
@@ -14,9 +14,9 @@
 
  * By default, the random value generator attempts to generate values
    limited to very roughly to around 128 bytes. If huge values are desired
-   (perhaps due to large constraints), the RMAX=<size> prefix can be specified
-   on a line:
+   (perhaps due to large constraints), the RMAX=<size> setting can be specified
+   in the ASN.1 comments:
 
-        RMAX=64000 T ::= VisibleString (SIZE(64000))
+        T ::= VisibleString (SIZE(64000))    -- RMAX=64000