A Search Algorithm for Latent Variable Models with Unbounded Domains