Fixed bug with properly inheriting environment roles in applications.