inference: override return type inference by const-prop more carefully (#44282)
A return type derived by const-prop' inference can be wider than that of
non const-prop' inference in rare cases e.g. when there are cycles but
cached result is still accurate. This commit checks if the const-prop'ed
result is really more accurate than non-const result.
fix https://github.com/Ferrite-FEM/Tensors.jl/issues/178