ensureSentinel: eliminate code duplication