Handle prerequisite tests in composite templates as per wiki so that
templates that don't match are not run