Issue 13689: byCodeUnit fails to be a random access range.

Add static assert to ensure random accessability.
Merge pull request #2656 from quickfur/issue13689

[trivial] Issue 13689: byCodeUnit fails to be a random access range.