Fix up some dependency loops

Change-Id: I39287bcaeaa1ac9687533f5030078f7499953ad7