Pass "included" status to "extending" template

[fixes #1593]