The flag variables for which expansions to evaluate were not always being initialized. This changes the code to always initialize the flags.