#925 - fix layer visibility toggle issue in firefox 27/28

No idea how to write a jasmine test to test this in a meaningful way.  Any suggestions welcome