Thread:Extension talk:Include/Mediawiki magic words inside src-parameter

Is it possible to use Mediawiki magic words like PAGENAME inside the src-parameter? We are having a problem that the magic words aren't processed before the include is processed, which means that our php-page gets parameter PAGENAME instead of the true page name.