core: always use MainResource
for main document
#13756
Merged
MainResource
for main document
#13756