Fixed DOMDocument loop where the first key was not zero in HHVM