Fix A_mul_B! for y inputs with NaNs by setting elements to zero when β is zero.

Fix #6092