Change handling of the linear flag.
More tests.