Weakly associated primes under change of rings