Merge "Fix a few issues with sensors reference-counting"