resolve method takes into account if the view comes wrapped

This is coming from a previous pull request

- keeps unwrapping until it finds the view
- catches exceptions