Do not allow to register sources until thread's context is initialized

Change-Id: I074a11f8d25f4082fb02a4ef4f7f111ed0eb07d0