fix 'no object found' {add,clear}_flags scenario
add the set_flags api for all object types