Move substitution away from parsing code and error out when archives (repos) are configured