fixed issue in which an expanded nested viewer can get stuck in the expanded state if the all images are closed