Bug 852847 - Part 4: Fix assertions on trunk caused by previous part. r=me, a=tef+

This was landed as Part 5 on trunk.