Add test for nested functions inside of escaping function