Bug 949475 - Add some debug-only sanity checks. r=bhackett

--HG--
extra : rebase_source : c64b96293ea729eb3dee52c59262904db849d7ae