retain flags in solving linear systems