Fix bug when changing customView while hud is visible

The hud would take another screenshot with the current hud visible, which would cause the screenshot to consider the current hud in the hierarchy as well.