Merge basic FLEX_BG support

Merge commit 'c2d4300b8a4a13d8a78b86c386f76259f23feec2' into next