Fix ensure_inclusion_of to support plain attributes

Also add missing tests to confirm this behavior.