remove substitution block before traversing the config