Table: Restrict selector scope by using generated popup ID

(cherry picked from commit 6e7f18571f64c8fc790b52fed6ad05fd2de7d0c6)

Closes gh-7342
Fixes gh-7341