methods will cause browser to crash"), fix contributed by jeff.dyer@compilercompany.com, r=drapeau@eng.sun.com. More bulletproof way of testing if principals passed in are valid (comments in the code fix explain in more detail).