Fix layout oddities caused by passing too many layout items