Fixed cache bug in smartgird.is_unlocked.