Fixed a bug in resolution of view templates