Minor optimization to BeatGrid::findNthBeat.