Fix interaction between vars and DeclaredSingletonTypes.