Fix removeChild failing under Karma