US no-fly error 'allowed terrorists on planes'