Added new RAII class flags_guard.