Site-selective oxygen-isotope substitution in YBa2Cu3O7−δ