Queryable mapping bug

Test cases and partial fix for mapping child collections. See http://stackoverflow.com/q/20046521/311289 for a bigger description.