Resolves: #i121410# Secured usage of pTextGroup

(cherry picked from commit 966c38038352a347f25d690f18a2059d6f78b9fa)

Change-Id: Ibbd68e8c102f2d80ea5b7610b9a97704a282e6ea