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

Fixes HPCC-10927

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>