Support for multi file templates in 8.1 and 8.2

Fixes #3