SF: Fix a couple of Layer ref count issues am: 92cd24e5f6
am: 56e16bb1ca

Change-Id: I64cac41e0f6e6412a3334cf17c15c9b754f8dd07