[BUGFIX] Also analyse current record to detect template's extension key