add tests for nx_tx_random_linear_combination() and fix bugs
revealed in the process.