Fix bug in spare node selection introduced by 13d0969ecd13981b