This check prevents the crash for me, you are right perhaps it should use ::is_empty(). If you think there is no crash or problem, did you try -reindex with empty data dir yet?