MDL-37835 completionlib: make update_state() more robust when COMPLETION_UNKNOWN is passed