apply patch from moz bug #520931 to remove extraneous assertions in debug