Update build script for stable TE API
Fix Forestry circular dependency error with TE