Resource group regression fixes. Fixes #180 and also fixes #181

See https://github.com/apiaryio/snowcrash/commit/7aef9f0c31c032b1e5056085ca787736b82483e3 for detailed description of the bigger changes.