FIX Template discovery on themed Layout templates

Was failing when 'main' template only exists in theme,
but 'Layout' template only exists in module.
Merge pull request #1818 from PutmanMedia/pulls/themed-main-templates

FIX Template discovery on themed Layout templates