You'd presumably have to run some part of the transclusion pipeline to properly handle template/module/page transclusion.