Speed up replacements when class is empty
Make sure the global page object exists
Do not modify anything if the template name is not the one of the current page layout
Merge branch 'hotfix/1.0.1'