Consistent scalar transport with front capturing methods: application to two-phase heat transfer