Fixes #2415: Added support for inverse relations