HPCC-10927 Refactor "EnsurePane" to always use a safe ID

Fixes HPCC-10927

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Merge pull request #5468 from GordonSmith/HPCC-10927

HPCC-10927 Refactor "EnsurePane" to always use a safe ID

Reviewed-By: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>