* Ensure redirects with domains are stored with the domain node id prefix. * Handle removal of self-referencing redirect when domains are used. * Use entity path to save further queries for retrieving ancestor IDs. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Applied refactoring suggested in code review. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>