Allow multiple levels of optional definitions

Below is a minimal example which would not work before this commit.
`/files` would have a GET method, but it should not.

#%RAML 0.8
title: Title
resourceTypes:
  - common:
      get?:
  - base:
      type: common
      get?:
/files:
    type: base