Merge branch 'V5-6-patches' into V5-7-patches

* V5-6-patches:
  util_func: fix skipping of digits which would run one too far