Run pragma replace in context of current spec.