Fix a small reference error in error logging
Replace recursion with iteration in SMIL parsing.

The recursive approach has been using up call stack.

Modern browsers can suffer from call stack limits as low as 20k frames - see:

http://stackoverflow.com/a/7828803

This would cause problems for publications containing more than about
20k spine items, which isn't quite outside the domain of possibility.