Template can back-export to array, patching gaps introduced by pruning. Added test case.