Fix level not being added correctly to record tree sub nodes