mergeNewParams does not work with POST requests

When working on commit 52424526efbed375f4b9f8960dca50dc7abdee37 , using a layer with long parameters (see -broken- example: http://openlayers.org/dev/examples/wms-long-url.html ) where POST requests (and iframes) are used, a mergeNewParams call with throw a "Cannot read property 'className' of null" during redraw.

This seems to be because the tile object does not have a "imgDiv" value (but a "frame" instead) and when trying to add a className "replacingCls" to the imgDiv during tile.onLoadStart and tile.onLoadEnd (Layer/Grid.js around line 1100) it blows up.

I currently wrap failure points with a "if (tile.imgDiv)" test as a quick workaround but I suspect a better option should be looked at if the class needs to be added on the image div within the iframe.
Maybe ahocevar could give us more info on this one?

Possibly unrelated but I noted that there are non-regression tests failures around that particular piece of code in tests/Layer/Grid.html test_backbuffer_replace with an imgDiv class missing.