By adding an extra check for empty hit vector and removing some repeated BC calculation, ATR-26988 should be fixed now
./cc @vadamico