Tests for hierarchy of templates in bundle-based repositories.

(Extra robustness for PR #78)