Merge "close a potential race condition in registerAsSystemService" into nyc-dev