BZ-1155852 - Performance improvement suggestion for getRuntimeEngine()

(cherry picked from commit 20f97fdeb2d5c102b947e01d5bab289fecff0696)