flag-controlled custom component testing

fixes #1735