Fixed NPE regression after fix for #11693

Change-Id: I8c9cf686d0746d790a1d55d66a75497fb627714c