Verify the connector hierarchy if assertions are enabled (#12271)

Change-Id: I87632abe9d86927b7ba4254724fedfdb04513205