As discussed in #18099, there is something wrong with the actual way of setting LinearCodes in the category framework.
This should be fixed.
CC: @videlec @johanrosenkilde
Component: coding theory
Issue created by migration from https://trac.sagemath.org/ticket/18150