Fix error with 'Add existing record' using record_select

Backport of #229 for the 3.2.x versions
Merge pull request #236 from Envek/229_backport

Fix error with 'Add existing record' using record_select (backport)