Fixes the branch commands to work for nested branch statements.