Fix a memory error related to measurements that aren't performed.