If you need to get an IE element to get HasLayout, the method is very simply, and you don't need to hide it from any other browser. Add the following CSS property:
zoom: 1;
THAT'S IT. YOU DON'T NEED ANY OTHER HACKING WIZARDRY. IT doesn't need to be hidden from anyone. It actually does what it says it does. There's nothing even hacky about it. It just works, and it has the nice bonus of adding hasLayout on IE.