Fixed state not set when importing old-style export files
Query tweak