Added functions for nested scope tables