Fix #927: Use a macro to automatically depend on right artifact

This should be private, shouldn't it?