Fix Issue #322. block name in template includes previous text by mistake

Existing code ends up including text already in the chunk as part of the name of the block definition in a base template. Fix is to save away the existing text in the chunk, clear out the chunk data, collect the block name by calling the function and then restore whatever data was in the chunk from before.