Resource model regression fixes

This PR brings fixes for some regression issues related to model parsing & referencing, namely:

- #195 
- #196 

In addition to model regression fixes this PR also fixes 

- #198 
I think this would still give a warning when there are no clashes in the payload and the model headers. Should that be the correct behaviour?