Is there any way to assert that an array or operation cannot mutate? Using Zygote

Is there any way to assert that an array or operation cannot mutate? Using Zygote I’m getting some confusing array mutation. In this case from simply matmul. EG:
> ERROR: LoadError: Mutating arrays is not supported
> Stacktrace:
> [1] error(::String) at ./error.jl:33
> [2] (::Zygote.var"#372#373")(::Nothing) at /home/rs/.julia/packages/Zygote/KpME9/src/lib/array.jl:58
> [3] (::Zygote.var"#2261#back#374"{Zygote.var"#372#373"})(::Nothing) at /home/rs/.julia/packages/ZygoteRules/OjfTt/src/adjoint.jl:59
> [4] _modify! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/generic.jl:83 [inlined]
> [5] (::typeof(∂(_modify!)))(::Nothing) at /home/rs/.julia/packages/Zygote/KpME9/src/compiler/interface2.jl:0
> [6] _generic_matmatmul! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/matmul.jl:841 [inlined]
> [7] (::typeof(∂(_generic_matmatmul!)))(::Array{Float64,2}) at /home/rs/.julia/packages/Zygote/KpME9/src/compiler/interface2.jl:0
> [8] generic_matmatmul! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/matmul.jl:728 [inlined]
> [9] (::typeof(∂(generic_matmatmul!)))(::Array{Float64,2}) at /home/rs/.julia/packages/Zygote/KpME9/src/compiler/interface2.jl:0
> [10] mul! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/matmul.jl:411 [inlined]
> [11] mul! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/matmul.jl:208 [inlined]
> [12] * at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/matmul.jl:153 [inlined]
> [13] (::typeof(∂()))(::Array{Float64,2}) at /home/rs/.julia/packages/Zygote/KpME9/src/compiler/interface2.jl:0
> [14] * at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/matmul.jl:61 [inlined]
> [15] (::typeof(∂(
)))(::Array{Float64,2}) at /home/rs/.julia/packages/Zygote/KpME9/src/compiler/interface2.jl:0
Seems like multiplying transpose sometimes causes mutation, but testing a simple example like
> gradient((x,y) -> sum(x * y’), [1.0,2.0],[3.0,4.0])
works fine.

Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread.
(Original message :slack:) (More Info)