Merge branch 'jc/checkout-detached' into maint