Fix getFirst/SecondComponent for split panels with only one component
(#14073, #14075).

Change-Id: Ibd7268078bcfe146258377a3c8580335d9da241c