Simplify a bit the retrieval of `nesting_level`

Instead of passing the fetched value to the initializing function, let's
directly write the value inside the struct's member.