I've attached a patch which fixes this bug and adds a test of that code path. The fixes can also be retrieved from https://github.com/rkd91/coreutils_rm_di_patch.