defer: fix support for anonymous functions
Update layer_line to new syntax