Added assertion to hopefully make #125 easier to track down in the future.