Merge "Prevent setting max layer above the input consumer" into tm-qpr-dev