Bug865750: switched to weakmap instead of element attribute hack