Fix a bug in javascript includes.
Better error messages for invalid compositions. See #80.