mw.loader.store: Detect malformed function stringification

See the bug for details.

This seems to happen somewhat consistently on Opera 12, let's
try to work around the browser bug before we blacklist it.

Includes some console logging.

Bug: 57567
Change-Id: Ifd7b203fb0ca61e4a749e6b0fc031e62121cc45a