PER-107: reverted some changes related to accessing globals directly