This is spooky. There seems to be an implicit understanding that elem.Val will be False if prop isn't a template, but I'm not sure. If so, it seems like explicitness is needed. `if template == False and not get_template` maybe?