Cause: apply-imports was used even when there was no current template possibly with in for-each.
Action: Make sure that apply-imports are invoked only if there is a current template and it is not in a xsl:for-each.
Solution doesn't works for you?
POST your error in our discussion panel below.
Our DBA team will be happy to help you :)