BUG: HTML5 target crashes when drawing Shape to BitmapData

Strange, i have almost the same code here and it works fine with Sprite