problem with weak_ptr comparisons