Test for behavior of replacement with ranges