Add test case for issue #7911

Issue #7911 report an ICE with self in macro in two methods with differing self mutability.

This seems to be solved now.

Closes #7911.