Velocity templates should be called for ascenedant primary types

Fix for: https://www.pivotaltracker.com/s/projects/684825/stories/79207804
Oooh, a condition that checks that templatesMap indeed contains the mixin is missing. Will fix and check for null.