title: Angular UI Bootstrap $scope.$modalInstance.close causes: Cannot read property 'value' of undefined
body: <p>I have a few modals, 2 are working perfectly, 1 is getting this exception when closing.
  (It does manage to close the modal, but angular logs out this exception).</p>
  
  <p>I've looked closer and, the <code>$modalInstance</code> is defined inside the <code>close</code> method, but <code>openedWindows.get($modalInstance)</code> returns <code>undefined</code>.</p>
  
  <p>How can I fix this?</p>