Optimize level 3 motion flags in the margin.