Added the block.super variable to templates that use the extra_head block to fix #1241.
Fixes javascript and styling problems in the replace layer view.
Fixes #1242.