Resource group regression fixes

See https://github.com/apiaryio/snowcrash/commit/7aef9f0c31c032b1e5056085ca787736b82483e3 for detailed description of the bigger changes. 

Fixes #180 and also fixes #181
The indentation here is messed up.