Fix bug #12889 - replaceInPlace overlapping array copy error

https://issues.dlang.org/show_bug.cgi?id=12889
[a,a) is an empty range just like arr[a..a] is empty. My motivation here is that we should solve the problem at its root, else we'd still need to fix `remove` after this patch.