Fix bugs in domfs open context

@rpaquay