It turns out to be quite a nuisance when copy() fails, as it did when I was developing this. Using std.algorithm.copy() means I have a metric ton of code to wade through, and much time expended. This unittest copy() doesn't need all the optimizations, special cases, etc., in std.algorithm.copy(), it just needs the most trivial version, which enabled me to quickly find the source of my problem (an array overflow).