Fixed off-by-one error in can_discard