Canadian aided foiled UK bomb plot, court hears