Avoid NSE exception on some subtemplates indexing.