Workaround a crash in GridLayout when using a Repeater
Needs further investigation on why it crashes but probably when the Repeater recreates
the items due to data changing somewhere.
Also use modelData to access model data.
Reviewed-by: Lukas Tinkl