Flux-pinning and crystal-field magnetostrictions in REBa2Cu3O7−x high-Tc superconductors