dsl_manager: storing previous state id

Needed for smart finalizers
bootstrap: _final extension, with test