Fixes #6390

Also replaces the call to dd_range() with the much more intuitive between()