Use getSizeRecursively consistently and optimize it slightly