improve performance of getFormtoolDefaults()

use pointer to avoid multiple nested scope lookups in the loop and
remove unnecessary string evaluations from square bracket notation