rcld: Prevent creation of cycles when a child replaces its parent

Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>