SDS: Refine Next command for subroutine branch