When blocks are verified it just needs to validate that sum of the outputs isn't more than the sum of the inputs. It doesn't care about tracking what went where.