title: Object not defined when running in a loop, but not when executed sequentially
body: <p>I'm using the <a href="http://digitalbush.com/projects/masked-input-plugin/" rel="nofollow">jQuery Masked Input plugin</a> to set all input elements with a data-mask attribute defined to the attribute mask value:</p>
  
  <p>Given this html:</p>
  
  <pre><code>&lt;input type='text' id="a" data-mask='999?999' /&gt;
  &lt;input type='text' id="b" data-mask='999' /&gt;
  </code></pre>
  
  <p>And this script:</p>
  
  <pre><code>$("input[data-mask]").each(function() {
  
      var maskValue = $(this).data('mask');
  
      console.log($(this).attr('id') + ": " + maskValue);
  
      //undefined error here on second iteration "b: 999"
      //no issues if you remove the data-mask from one of the input elements
      return $(this).mask(maskValue);
  
  });
  </code></pre>
  
  <p>The second iteration an error is thrown: "Uncaught TypeError: undefined is not a function" on this line, saying 'split' is not defined.</p>
  
  <pre><code>firstNonMaskPos = null, $.each(mask.split(""), function(i, c) {
  </code></pre>
  
  <p>This code however works just fine, the masks are set with no issue.</p>
  
  <pre><code>$('#a').mask('999?999');
  $('#b').mask('999');
  </code></pre>
  
  <p>Could anyone shine any light on this odd behavior?</p>
  
  <p><a href="http://jsfiddle.net/oj4pt642/3/" rel="nofollow">Demo jsFiddle here</a></p>