Restored automatic detection of new variables which had been delegated to tests in commit SHA 1b419b6f. Made the feature conditional on a flag, AUTO_DETECT_NEWVAR, which is currently hardcoded TRUE, but could be made an option. If FALSE, new variable detection would again be delegated to tests.