Make @UIScoped work with non-UI classes (#11215)

Change-Id: I2a010762c585f91256afbc667ef7794aeb2f23ae