4f collapse, level density inflation and the emergence of 'compound-like' atomic states in rare earth ions