Do not resolve bodies for non-active files
Join build thread in tests for templates
Update to Kotlin 0.6.2516