Adds tests for preivous bug fix. Closes #273.