Another refinement hack for flow types.
Migrate the matrix extension.