Added a failing assertion for #428
manual merge of #431 due to minor conflicts in some of the js files