This is essentially Patch 3 of ag/2918035. Test: I solemnly swear I tested this conflict resolution. Change-Id: Id973f4ca7444ca42113a3432867cf9290ddf9e0d