fix($compile): handle elements with no childNodes property

see the test for more details