Fixes for new compiling attempt, also fixed "compile" errors due to external dependencies in ResegFromTree.