Merge "Don't call saveLayer() when it's not required Bug #5435653"