SimpleTemplate: prevent infinite include recursion and reuse cache for include