Merge "Fix crash on invalid dimlayer"