It is acceptable for a transaction input in a block to reference the output of another transaction in the same block only if the referenced transaction comes before the transaction referencing it.