BUGFIX: Correctly updates all level references