o Set the standalone flag before it's being used. Fixes #3426.