Fix GridLayout layout issue with empty rows above a component (#14554)

* Issue introduced in 8476b57ce2261313f47b21764ddc02cc128b2fd4

Change-Id: Ie84489aac4553e70e7e80561aec748a874a85653