Seems like you could do something better than a log statement here, maybe an assert?