wait for parse to finish before resolving load promise for xhtml files

fixes half of https://www.pivotaltracker.com/story/show/59193074