Handle TemplateParser::parsePage() returning an empty array

Bug: 73107
Change-Id: I0361a6bd8f6103559a5cfc91fb99b706a39223df
(cherry picked from commit 636297d74f98c9f1af89429c3937839559fa21fc)