More fixes for identifier handling