Add flattened and non-flattened case switching.