Fix parser errors for unclosed $( in here docs