[fix] Fixes module "Related Item" in PostgreSQL. Closes #5243