Simpler and more precise type derivation for APPEND/NCONC