BacktrackingSolver: Fixed handling of multiple-command dependencies