Fixes: #2643 Returning empty list when searching non existing branch