Fix saving layer lock, alpha lock and alpha inheritance
BUG:399513 (cherry picked from commit 1e51130f30ebb28ee427cb044f4a6bd365f09d80)