rebase: reorder parent check and state storage
This could cause a rebase to be 'in progress' even though it aborted.
Greg Ward, author of the original bfiles extensionNa'Tosha Bard of Unity TechnologiesFog Creek SoftwareSpecial thanks to the University of Toronto and the UCOSP program