Fixes #4716 - specify the table the id comes from

Otherwise, postgres says `column reference \"id\" is ambiguous`