References #2465: Changed lock so it's shared across all layouts that derive from AbstractLayoutTask.

(cherry picked from commit b9ce7f9cd5f0f93492edd8f8b4a183360267ca2c)