Bug 994282 - Apply mask layer transforms in the correct order. r=roc