UPDATE: I discovered the source of the transient error message; that is solved.
The remaining issue is the backslashes appearing in the HTML, causing the map not to format correctly. Note that this happens only when the map is re-drawn in a AJAX call.