Condition flagNotSet, JS setFlag implemented