Missing const on weak_ptr lock, addresses part of issue #43