checkout: don't confuse ref and object flags