It's possible to pass any extra parameters to <inp2:m_include .../> tag. In this particular example they can be used to template to track origin of inclusion.
For example:
/path/to/main.tpl
bla-bla
<inp2:m_include template="elements/included" origin="path/to/main"/>
/path/to/elements/included.tpl
<inp2:m_DefaultParam origin=""/>
bla-bla
<inp2:m_if check="m_Param" name="origin" equals_to="path/to/main">
do some stuff
</inp2:m_if>
Notice m_DefaultParam tag, that sets default parameter value in case if it wasn't passed.