Closes #1182
Changes recorder so that PauseElement are inserted before TagElements