Properly determine the parent selector within a mixin.

Closes #929